<script type="text/javascript" src="source/plugin/aljbd/js/lrz.mobile.min.js"></script>
<script type="text/javascript">
	function lrz_mobile(id,evt){
		file = evt.files[0];
		
		
		if (!file.type.match('image.*')) {
			alert('$imgmes');
		}
		
		lrz(file, {
			width:1000,
			before: function() {
				//console.log('start');
			},
			fail: function(err) {
				console.error(err);
			},
			always: function() {
				//console.log('end');
			},
			done: function (results) {
			jq('#img_'+id).html('<br/>\u4e0a\u4f20\u4e2d\u8bf7\u7a0d\u540e<img src="static/image/common/loading.gif"/>');
			
			jq('#img_'+id).html('<br/><img src="'+results.base64+'" width="100px" height="100px"><input type="hidden" name="'+id+'"  value="'+results.base64+'"><a href="javascript:;" onclick="delattach(\''+id+'\')" class="upload_delete bw_delimg" id="upload_delete_0" data-index="0"><img src="source/plugin/$pluginid/images/img_close.png" width="20"></a>');
		}})
	}
	function delattach(id){
		jq('#img_'+id).html('<br/>');
		jq('#'+id).html('<input type="file" name="'+id+'" style="width:200px;"  onchange="lrz_mobile(\''+id+'\',this)">');
	}
</script>